Optimal. Leaf size=102 \[ -a x-\frac {5 b \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {(16 a+5 b \sec (c+d x)) \tan (c+d x)}{16 d}-\frac {(8 a+5 b \sec (c+d x)) \tan ^3(c+d x)}{24 d}+\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3966, 3855}
\begin {gather*} \frac {\tan ^5(c+d x) (6 a+5 b \sec (c+d x))}{30 d}-\frac {\tan ^3(c+d x) (8 a+5 b \sec (c+d x))}{24 d}+\frac {\tan (c+d x) (16 a+5 b \sec (c+d x))}{16 d}-a x-\frac {5 b \tanh ^{-1}(\sin (c+d x))}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3966
Rubi steps
\begin {align*} \int (a+b \sec (c+d x)) \tan ^6(c+d x) \, dx &=\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d}-\frac {1}{6} \int (6 a+5 b \sec (c+d x)) \tan ^4(c+d x) \, dx\\ &=-\frac {(8 a+5 b \sec (c+d x)) \tan ^3(c+d x)}{24 d}+\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d}+\frac {1}{24} \int (24 a+15 b \sec (c+d x)) \tan ^2(c+d x) \, dx\\ &=\frac {(16 a+5 b \sec (c+d x)) \tan (c+d x)}{16 d}-\frac {(8 a+5 b \sec (c+d x)) \tan ^3(c+d x)}{24 d}+\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d}-\frac {1}{48} \int (48 a+15 b \sec (c+d x)) \, dx\\ &=-a x+\frac {(16 a+5 b \sec (c+d x)) \tan (c+d x)}{16 d}-\frac {(8 a+5 b \sec (c+d x)) \tan ^3(c+d x)}{24 d}+\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d}-\frac {1}{16} (5 b) \int \sec (c+d x) \, dx\\ &=-a x-\frac {5 b \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {(16 a+5 b \sec (c+d x)) \tan (c+d x)}{16 d}-\frac {(8 a+5 b \sec (c+d x)) \tan ^3(c+d x)}{24 d}+\frac {(6 a+5 b \sec (c+d x)) \tan ^5(c+d x)}{30 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.14, size = 103, normalized size = 1.01 \begin {gather*} \frac {-240 a \text {ArcTan}(\tan (c+d x))-75 b \tanh ^{-1}(\sin (c+d x))+\frac {1}{8} (295 b+1168 a \cos (c+d x)+140 b \cos (2 (c+d x))+568 a \cos (3 (c+d x))+165 b \cos (4 (c+d x))+184 a \cos (5 (c+d x))) \sec ^5(c+d x) \tan (c+d x)}{240 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 143, normalized size = 1.40
method | result | size |
derivativedivides | \(\frac {b \left (\frac {\sin ^{7}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}-\frac {\sin ^{7}\left (d x +c \right )}{24 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{7}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{16}+\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{48}+\frac {5 \sin \left (d x +c \right )}{16}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+a \left (\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}+\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(143\) |
default | \(\frac {b \left (\frac {\sin ^{7}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}-\frac {\sin ^{7}\left (d x +c \right )}{24 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{7}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{16}+\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{48}+\frac {5 \sin \left (d x +c \right )}{16}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+a \left (\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}+\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(143\) |
risch | \(-a x -\frac {i \left (165 b \,{\mathrm e}^{11 i \left (d x +c \right )}-720 a \,{\mathrm e}^{10 i \left (d x +c \right )}-25 b \,{\mathrm e}^{9 i \left (d x +c \right )}-2160 a \,{\mathrm e}^{8 i \left (d x +c \right )}+450 b \,{\mathrm e}^{7 i \left (d x +c \right )}-3680 a \,{\mathrm e}^{6 i \left (d x +c \right )}-450 b \,{\mathrm e}^{5 i \left (d x +c \right )}-3360 a \,{\mathrm e}^{4 i \left (d x +c \right )}+25 b \,{\mathrm e}^{3 i \left (d x +c \right )}-1488 a \,{\mathrm e}^{2 i \left (d x +c \right )}-165 b \,{\mathrm e}^{i \left (d x +c \right )}-368 a \right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {5 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}+\frac {5 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}\) | \(199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 134, normalized size = 1.31 \begin {gather*} \frac {32 \, {\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a - 5 \, b {\left (\frac {2 \, {\left (33 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} + 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.10, size = 134, normalized size = 1.31 \begin {gather*} -\frac {480 \, a d x \cos \left (d x + c\right )^{6} + 75 \, b \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 75 \, b \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (368 \, a \cos \left (d x + c\right )^{5} + 165 \, b \cos \left (d x + c\right )^{4} - 176 \, a \cos \left (d x + c\right )^{3} - 130 \, b \cos \left (d x + c\right )^{2} + 48 \, a \cos \left (d x + c\right ) + 40 \, b\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \tan ^{6}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 228 vs.
\(2 (94) = 188\).
time = 2.35, size = 228, normalized size = 2.24 \begin {gather*} -\frac {240 \, {\left (d x + c\right )} a + 75 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 75 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (240 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 75 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 1520 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 425 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 4128 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 990 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 4128 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 990 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1520 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 425 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 240 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 75 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.51, size = 331, normalized size = 3.25 \begin {gather*} \frac {\left (\frac {5\,b}{8}-2\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (\frac {38\,a}{3}-\frac {85\,b}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {33\,b}{4}-\frac {172\,a}{5}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {172\,a}{5}+\frac {33\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {38\,a}{3}-\frac {85\,b}{24}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a+\frac {5\,b}{8}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {5\,b\,\mathrm {atanh}\left (\frac {125\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,\left (20\,a^2\,b+\frac {125\,b^3}{64}\right )}+\frac {20\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{20\,a^2\,b+\frac {125\,b^3}{64}}\right )}{8\,d}-\frac {2\,a\,\mathrm {atan}\left (\frac {64\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3+\frac {25\,a\,b^2}{4}}+\frac {25\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\left (64\,a^3+\frac {25\,a\,b^2}{4}\right )}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________